﻿using SpotsHub.Gateway.Models.Common;
using SpotsHub.Gateway.Utilities;
using Nop.Web.Framework;
using System;
using System.Collections.Generic;

namespace SpotsHub.Gateway.Models.Customer
{
    public class LogisticsRenewModel
    {
        public LogisticsRenewModel()
        {
            History = new List<MemberPurchaseRecord>();
            MembershipOptions = new List<MembershipTypeModel>();
            BillingAddress = new AddressModel()
            {
                CountryId = AddressHelper.GetDefaultCountryId(),
                CountryName = AddressHelper.GetDefaultCountryName(),
                StateProvinceId = AddressHelper.GetDefaultProvinceId(),
                StateProvinceName = AddressHelper.GetDefaultProvinceName()
            };
        }

        [NopResourceDisplayName("Logistics.Register.AcceptCondition")]
        public bool Accepted { get; set; }

        [NopResourceDisplayName("Logistics.Register.MemberExpireDays")]
        public int? MembershipExpireDays { get; set; }

        public IList<MemberPurchaseRecord> History { get; set; }

        public AddressModel BillingAddress { get; set; }
        public AddressModel Address { get; set; }

        public IList<MembershipTypeModel> MembershipOptions { get; set; }
        public int? SelectedProductVariantId { get; set; }

        public class MemberPurchaseRecord
        {
            public DateTime Date { get; set; }
            public string MemberType { get; set; }
            public int Days { get; set; }
        }
    }
}